#ifndef MENU_H
#define MENU_H

#include "Engine.h"
#include "Widget.h"
#include <SFML/Graphics.hpp>
#include <list>

class WidgetButton;

class Menu : public Engine
{
    public:
        Menu(Application*);
        virtual void onLaunch();
        virtual void onRender(sf::RenderWindow*);
        virtual void onTick();
        virtual void onEvent(sf::Event*);
        virtual void onClose();

        void addWidget(Widget*);
        void removeWidget(Widget*);

        virtual void onButtonPressed(WidgetButton*);

        virtual void setBackgroundImage(std::string);
        virtual ~Menu();
    protected:
        sf::Sprite background;
        std::list<Widget*> widgets;
};

#endif // MENU_H
